#include "lib_fixed.h"

fixed fixed::operator [] (int p) const
{
    fixed x(0, p);
    x.value =
        p < precision ?
            value / SCALE.x[precision - p] :
            p > precision ?
        value * SCALE.x[p - precision] :
        value;
    return x;
}

